package com.mdd.admin.validate.setting;

import com.mdd.common.validator.annotation.IDMust;
import com.mdd.common.validator.annotation.IntegerContains;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import lombok.Data;
import javax.validation.constraints.*;
import java.io.Serializable;

/**
 * 通知设置参数
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class DevNoticeSettingParam implements Serializable {

    private static final long serialVersionUID = 1L;

    public interface create{}
    public interface update{}
    public interface delete{}

    @IDMust(message = "id参数必传且需大于0", groups = {update.class, delete.class})
    private Long id;

    @NotNull(message = "sceneId参数缺失", groups = {create.class, update.class})
    @DecimalMin(value = "0", message = "sceneId参数值不能少于0", groups = {create.class, update.class})
    private Integer sceneId;

    @NotNull(message = "sceneName参数缺失", groups = {create.class, update.class})
    @Length(max = 255, message = "sceneName参数不能超出255个字符", groups = {create.class, update.class})
    private String sceneName;

    @NotNull(message = "sceneDesc参数缺失", groups = {create.class, update.class})
    @Length(max = 255, message = "sceneDesc参数不能超出255个字符", groups = {create.class, update.class})
    private String sceneDesc;

    @NotNull(message = "recipient参数缺失", groups = {create.class, update.class})
    @DecimalMin(value = "0", message = "recipient参数值不能少于0", groups = {create.class, update.class})
    private Integer recipient;

    @NotNull(message = "type参数缺失", groups = {create.class, update.class})
    @DecimalMin(value = "0", message = "type参数值不能少于0", groups = {create.class, update.class})
    private Integer type;

    private String systemNotice;

    private String smsNotice;

    private String oaNotice;

    private String mnpNotice;

    @NotNull(message = "support参数缺失", groups = {create.class, update.class})
    @Length(max = 10, message = "support参数不能超出10个字符", groups = {create.class, update.class})
    private String support;

}
